﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:AvalonDock="clr-namespace:AvalonDock;assembly=AvalonDock"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:Custom="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon"
    xmlns:Microsoft_Windows_Controls_Ribbon_Primitives="clr-namespace:Microsoft.Windows.Controls.Ribbon.Primitives;assembly=RibbonControlsLibrary" 
    xmlns:local="clr-namespace:EAII_GS" 
    mc:Ignorable="d"
	x:Class="EAII_GS.MainWindow"
	x:Name="Window"
	Title="Green Building Studio"
	Width="640" Height="480" Background="#FF381A47"  >
	<Grid x:Name="Main_Grip" Margin="0,1,0,0" 
          ScrollViewer.HorizontalScrollBarVisibility="Auto" 
          ScrollViewer.VerticalScrollBarVisibility="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.35*" />
            <ColumnDefinition Width="0.65*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
			<RowDefinition Height="31"/>
            <RowDefinition Height="25" />
            <RowDefinition/>
			<RowDefinition Height="34"/>
		</Grid.RowDefinitions>

        <Menu Grid.ColumnSpan="2" Background="#FF9B21C0" Margin="0,0,0,8" FontSize="12">
            <MenuItem Header="File" >
                <MenuItem x:Name="mm_newproject" Header="New Project" Click="Event_CreateProject"/>
                <MenuItem x:Name="mn_openproject" Header="Open Project" Click="event_openproject"/>
                <MenuItem Header="Save Project"/>
                <MenuItem Header="Exit "/>
            </MenuItem>
            <MenuItem Header="Help" >
                <MenuItem Header=" About Us" />
                <MenuItem Header=" About EcoSystem Studio" />
            </MenuItem>
        </Menu>

        <!--toolbar-->
        <ToolBar x:Name="toolBar1" Background="#FF532B5C" Grid.ColumnSpan="2" VerticalAlignment="Top" 
                 Grid.Row="1" Grid.Column="0" Height="32" Margin="0,-8,0,0" >
            <Button HorizontalAlignment="Left" x:Name="new_project" ToolTip="New Project" Width="47">
                <Image Source="Image/tool_bar/new_project.ico" Width="17" Height="17"  
                       MouseLeftButtonDown="Event_CreateProject" />
            </Button>
            <Separator />
            <Button HorizontalAlignment="Left" x:Name="open_project" ToolTip="Open File" Width="47" >
                <Image Source="Image/tool_bar/open2.ico" Width="17" Height="17" MouseLeftButtonDown="event_openproject"/>
            </Button>
            <Separator />
            <Button HorizontalAlignment="Left" x:Name="save_all" ToolTip="Save all" Width="47">
                <Image Source="Image/tool_bar/save all.ico" Width="17" Height="17" />
            </Button>
            <Separator />
            <Button HorizontalAlignment="Left" x:Name="save" ToolTip="Save this" Width="47">
                <Image Source="Image/tool_bar/save.ico" Width="17" Height="17"  />
            </Button>
            <Separator />
			
			<Button HorizontalAlignment="Right" x:Name="Library" ToolTip="Manage Library " Width="47">
                <Image Source="Image/my cases1.ico" Width="17" Height="17" MouseLeftButtonDown="Event_SetDependence"  />
            </Button>
            <Separator />
        </ToolBar>

        <AvalonDock:DockingManager Grid.Row="2" ScrollViewer.HorizontalScrollBarVisibility="Visible" 
                                   HorizontalContentAlignment="Stretch" Grid.ColumnSpan="2" Margin="0,8,0,0">
			<AvalonDock:DockingManager.MainDocumentPane>
				<AvalonDock:DocumentPane/>
			</AvalonDock:DockingManager.MainDocumentPane>
			<AvalonDock:ResizingPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Visible" Margin="0,0,0,6.5">
				<AvalonDock:DockablePane x:Name="dap_projectinfor" AvalonDock:ResizingPanel.ResizeWidth="200" 
                                         Margin="0,0,-8,0" 
                                         ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                         HorizontalContentAlignment="Stretch" 
                                         ScrollViewer.VerticalScrollBarVisibility="Auto" 
                                         VerticalContentAlignment="Stretch">
					<AvalonDock:DockableContent Title="Information Project"
                                                ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                                HorizontalContentAlignment="Stretch"
                                                ScrollViewer.VerticalScrollBarVisibility="Auto">
						<TreeView x:Name="Tr_Main" HorizontalContentAlignment="Stretch" 
                                  VerticalContentAlignment="Stretch" Margin="4,0,-6,1.5">
							<TreeView.ContextMenu>
								<ContextMenu>
									<MenuItem x:Name="Menucontext_Add" Header="Add">
										<MenuItem x:Name="Menucontext_Add_System" Header="Add System"/>
										<MenuItem x:Name="Menucontext_Add_Item" Header="Add Item"/>
									</MenuItem>
									<MenuItem x:Name="Menucontext_Import" Header="Import">
										<MenuItem x:Name="Menucontext_Import_System" Header="Import System"/>
										<MenuItem x:Name="Menucontext_Import_Item" Header="Import Item"/>
									</MenuItem>
									<MenuItem x:Name="Menucontext_Export" Header="Export">
										<MenuItem x:Name="Menucontext_Export_System" Header="Export System"/>
										<MenuItem x:Name="Menucontext_Export_Item" Header="Export Item"/>
									</MenuItem>
									<MenuItem x:Name="Menucontext_Rename" Header="Rename"/>
									<MenuItem x:Name="Menucontext_Report" Header="Report"/>
									<MenuItem x:Name="Menucontext_Delete" Header="Delete"/>
									<MenuItem x:Name="Menucontext_SetDependency" Header="Set Dependency"/>
								</ContextMenu>
							</TreeView.ContextMenu>
							<TreeViewItem Header="Project">
								<TreeViewItem.ContextMenu>
									<ContextMenu>
										<MenuItem Header="Add Zone">
											<MenuItem Header="New Zone"/>
											<MenuItem Header="Existing Zone"/>
										</MenuItem>
										<MenuItem Header="Rename "/>
										<MenuItem Header="New Folder"/>
									</ContextMenu>
								</TreeViewItem.ContextMenu>
								<TreeViewItem Header="Zone 1">
									<TreeViewItem.ContextMenu>
										<ContextMenu>
											<MenuItem Header="Add Item">
												<MenuItem Header="New Item"/>
												<MenuItem Header="Existing Item"/>
											</MenuItem>
											<MenuItem Header="Rename"/>
											<MenuItem Header="Export"/>
											<MenuItem Header="Delete"/>
										</ContextMenu>
									</TreeViewItem.ContextMenu>
									<TreeViewItem Header="Heat Load 1">
										<TreeViewItem.ContextMenu>
											<ContextMenu>
												<MenuItem Header="Add Item">
													<MenuItem Header="New Item"/>
													<MenuItem Header="Existing Item"/>
												</MenuItem>
												<MenuItem Header="Rename"/>
												<MenuItem Header="Delete"/>
												<MenuItem Header="Set Dependence"/>
												<MenuItem Header="Export"/>
												<MenuItem Header="Report"/>
											</ContextMenu>
										</TreeViewItem.ContextMenu>
									</TreeViewItem>
									<TreeViewItem Header="Heat Load 2">
										<TreeViewItem Header="Refrigeration Cycle1"/>
									</TreeViewItem>
									<TreeViewItem Header="Refrigeration Cycle 1">
										<TreeViewItem Header="Thermal Equirment Design 1"/>
									</TreeViewItem>
								</TreeViewItem>
								<TreeViewItem Header="Zone 2">
									<TreeViewItem Header="Refrigeration Cycle"/>
								</TreeViewItem>
								<TreeViewItem Header="Zone 3"/>
							</TreeViewItem>
						</TreeView>
					</AvalonDock:DockableContent>
				</AvalonDock:DockablePane>
				<AvalonDock:DocumentPane x:Name="dcp_itemcal" 
                                         ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                                         HorizontalContentAlignment="Stretch" 
                                         ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="2,0,0,0">
					<AvalonDock:DocumentContent Title="Refrigeration Cycle 1" 
                                                ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                                                HorizontalContentAlignment="Stretch" 
                                                ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <local:uc_REF ScrollViewer.HorizontalScrollBarVisibility="Auto"/>	
					</AvalonDock:DocumentContent>
					<AvalonDock:DocumentContent Title="Refrigeration Cycle 2" ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                                                HorizontalContentAlignment="Stretch" 
                                                ScrollViewer.VerticalScrollBarVisibility="Auto" >
						<local:REF ScrollViewer.HorizontalScrollBarVisibility="Auto"/>							
						</AvalonDock:DocumentContent>
					<AvalonDock:DocumentContent Title="Refrigeration Cycle 3" ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                                                HorizontalContentAlignment="Stretch" 
                                                ScrollViewer.VerticalScrollBarVisibility="Auto">
						<local:UC_REF2 ScrollViewer.HorizontalScrollBarVisibility="Auto" Background="#FF3D1858" Margin="0,0,2.067,0"   />
						</AvalonDock:DocumentContent>
				</AvalonDock:DocumentPane>
			</AvalonDock:ResizingPanel>
		</AvalonDock:DockingManager>
		
	</Grid>
</Window>